The present invention relates to an improved apparatus and method for polarity detection and automatic reversal of an incorrect polarity for a differential receiver. The incorporated patent application provides for one embodiment of an automatic polarity detection and reversal apparatus and method. The present invention improves upon the previous invention to provide an apparatus which is useful in both a heavily loaded and a lightly loaded network. Loading of a network in this case refers to an amount of data transmitted over the network. Thus, a lightly loaded network is a network which has relatively few data transmissions.
FIG. 5 is a block diagram having two Medium Attachment Units (MAUs) 50 interconnected by a pair of twisted pair cables 52 to form a simple network. The twisted pair cables 52 transmit data packets and linkbeat pulses from one MAU 50 to the other according to the IEEE 802.3 10BASE-T standard, which is expressly incorporated by reference for all purposes. The standard requires that when one MAU 50 is not transmitting a data packet to another MAU 50, it should periodically transmit linkpulses to the MAU 50 to test an integrity of a link between the MAUs 50. FIG. 6A illustrates one example of one such packet having a preamble portion, a data portion and an end of transmission delimiter (ETD) portion. The preamble portion is an alternating series of high and low transitions and the ETD is a high level for a specified minimum time duration. FIG. 6B is an illustration of two acceptable linkpulse transmit waveforms conforming to the IEEE Specification. A linkpulse waveform is either a high transition or a high transition followed by a low transition fitting within a specified pulse template. A linktest state machine which performs the link integrity test functions described in the IEEE 802.3 10BASE-T specification monitors these link pulses to determine whether any link between two particular MAUs 50 passes a link integrity test. Upon power up or RESET, a particular MAU resets to a particular known state, either a link.sub.-- pass state or link fail state. If there is no packet information received, the MAU 50 will expect to periodically receive a series of linkpulses, just as it periodically transmits a linkpulse in the absence of other transmissions. A MAU can be designed to recognize positiveonly or any polarity of link pulses. An advantage of recognizing only one polarity of link pulse at a time is that it is less likely that noise spikes will be recognized as link pulses. If a MAU 50 is designed to recognize only positive pulses, it must receive link pulses similar to those shown in FIG. 6B to enter or remain in the link.sub.-- pass state. If the MAU 50 does not receive positive linkpulses within the time windows, the IEEE Specification requires, then the MAU 50 will transition to a link.sub.-- fail state. The link.sub.-- fail state can result from a faulty link, a disconnected lead disabled driver at transmitter reversed leads or other electrical or mechanical fault of the twisted pair cable 52 on its receive data (RD) lines. A reversed twisted pair cable 52 causes a differential receiver to receive an inverted differential signal, meaning that the linkpulses will appear inverted. FIG. 6C is an illustration of an inverted linkpulse signal which results from incorrect connection of the twisted pair cable 52.
A typical MAU 50 which recognizes positive linkpulses only and receiving an inverted linkpulse as shown in FIG. 6C will ignore the linkpulse, causing the MAU either to transition to the link.sub.-- fail state, or to remain in the link.sub.-- fail state. The MAUs 50 may also exit a link.sub.-- fail state by receiving a data packet. The parent application allows a MAU 50 receiving valid data packets to detect reversed polarity at its RD input and to automatically correct it. However, this method requires receipt of a prespecified number of valid and consistent packets by the MAU 50. If the network is lightly loaded, the MAUs 50 will not receive enough data packets to keep the MAUs 50 from relying on linkpulses to test its link.
A potential difficulty with this prior apparatus and method results from a configuration similar to that of FIG. 5 in which both MAUs 50 have incorrectly wired twisted pair cables 52 for their RD inputs. If both MAUs 50 only look for a linkpulse with an initially positive transition, and the MAU 50 powers up in the link.sub.-- fail state, then the two MAUs 50 will continually receive inverted linkpulses from each other. These inverted linkpulses will not bring the MAUs 50 out from the link.sub.-- fail state. When the MAUs 50 are in the link.sub.-- fail state, the linktest state machine disables output drivers of the MAUs 50, preventing the MAUs 50 from transmitting data packets. Since the prior apparatus and method relied exclusively on packet information to detect and correct polarity, the MAUs 50 of FIG. 5 would be unable to detect the incorrect polarity and correct themselves. In other words, the MAUs 50 would be locked-out and not function to correct polarity. Note that for a lightly-loaded network, a MAU 50 which powers up in a link.sub.-- pass state would inevitably enter the link.sub.-- fail state and be locked-out as well.
Therefore, it is a desire to improve upon the prior apparatus and method to provide an improved and robust polarity detection and correction which is operable for the network of FIG. 5.